import request from "/@/utils/request"

//购买信息
export function buyInfo(query?: Object) {
  return request({
    url: '/train/spkInformation/page',
    method: 'get',
    params: query
  })
}
//资料类型下拉框
export function getDataTypeList(query?: Object) {
  return request({
    url: '/train/spkZlData/getDataTypeList',
    method: 'get',
    params: query
  })
}
//删除购物车商品
export function deleteShoppingCart(ids?: Object) {
  return request({
    url: '/train/spkZlData/deleteShoppingCart',
    method: 'post',
    data: ids
  })
}
//添加购物车
export function addShoppingCart(obj?: Object) {
  return request({
    url: '/train/spkZlData/addShoppingCart',
    method: 'post',
    data: obj
  })
}
//购物车
export function getShoppingCartList(query?: Object) {
  return request({
    url: '/train/spkZlData/getShoppingCartList',
    method: 'get',
    params: query
  })
}
export function fetchList(query?: Object) {
  return request({
    url: '/train/spkZlData/page',
    method: 'get',
    params: query
  })
}
//新增
export function addObj(obj?: Object) {
  return request({
    url: '/train/spkZlData/saveData',
    method: 'post',
    data: obj
  })
}
//查询
export function getObj(id?: string) {
  return request({
    url: '/train/spkZlData/getListById/' + id,
    method: 'get'
  })
}
//删除
export function delObjs(ids?: Object) {
  return request({
    url: '/train/spkZlData/deleteData',
    method: 'post',
    data: ids
  })
}
//编辑保存
export function putObj(obj?: Object) {
  return request({
    url: '/train/spkZlData/editData',
    method: 'post',
    data: obj
  })
}

